package com.xxx.meter.ui.meter;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.xxx.meter.R;
import com.xxx.meter.base.BaseActivity;
import com.xxx.meter.model.utils.ButtonUtil;
import com.xxx.meter.ui.meter.reading.home.MeterReadingActivity;
import com.xxx.meter.ui.meter.switchgear.home.MeterSwitchgearActivity;

import butterknife.BindView;
import butterknife.OnClick;

public class CheckMeterActivity extends BaseActivity {

    @BindView(R.id.main_title)
    TextView mTitle;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_check_patrol;
    }

    @Override
    protected void initData() {
        mTitle.setText("选择操作方式");
    }

    @OnClick({R.id.main_return, R.id.check_meter_reading, R.id.check_meter_switchgear})
    public void OnClick(View view) {
        if (ButtonUtil.isFastClick()) return;
        switch (view.getId()) {
            case R.id.main_return:
                finish();
                break;
            case R.id.check_meter_reading:
                startActivity(new Intent(this, MeterReadingActivity.class));
                break;
            case R.id.check_meter_switchgear:
                startActivity(new Intent(this, MeterSwitchgearActivity.class));
                break;
        }
    }
}
